package com.hqd.ch03.test.event;


import com.hqd.ch03.v14.aware.BeanFactoryEventPublisherAware;
import com.hqd.ch03.v14.listener.BeanFactoryEventPublisher;
import com.hqd.ch03.v14.listener.event.BeanFactoryEvent;

public class EventPublisher implements BeanFactoryEventPublisherAware {

    private BeanFactoryEventPublisher eventPublisher;

    //发布事件
    public void publishEvent(BeanFactoryEvent event) {
        eventPublisher.publishEvent(event);
    }

    @Override
    public void setBeanFactoryEventPublisher(BeanFactoryEventPublisher eventPublisher) {
        this.eventPublisher = eventPublisher;
    }
}
